package com.jinmdz.fmis.api.model.test;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jinmdz.fmis.common.annotation.AnValidate;
import com.jinmdz.fmis.common.constant.EValidateCode;
import com.jinmdz.fmis.core.base.BaseBean;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;

/**
 * validate数据
 *
 * @author LiCongLu
 * @date 2020-01-10 08:42
 */
public class ValidateData extends BaseBean {
    /**
     * 姓名
     */
    @AnValidate(name = "姓名", required = true)
    @ApiModelProperty(position = 1)
    private String name;

    /**
     * 性别
     */
    @AnValidate(name = "性别", code = EValidateCode.REQUIRED)
    @ApiModelProperty(position = 2)
    private Integer sex;
    /**
     * 年龄
     */
    @AnValidate(name = "年龄")
    @ApiModelProperty(position = 3)
    private Integer age;

    /**
     * 身份证号
     */
    @AnValidate(name = "身份证号")
    @ApiModelProperty(position = 4)
    private String idCard;
    /**
     * 出生日期
     */
    @AnValidate(name = "出生日期")
    @ApiModelProperty(position = 5, example = "2018-10-01")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /**
     * 移动电话
     */
    @AnValidate(name = "移动电话")
    @ApiModelProperty(position = 6)
    private String mobilePhone;

    /**
     * 死亡时间
     */
    @AnValidate(name = "死亡时间")
    @ApiModelProperty(position = 7, example = "2019-10-01")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deadTime;

    /**
     * 费用
     */
    @AnValidate(name = "费用")
    @ApiModelProperty(position = 8)
    private BigDecimal charge;
    /**
     * 行车里程
     */
    @AnValidate(name = "行车里程")
    @ApiModelProperty(position = 9)
    private Double transportDistance;

    /**
     * 验证账号
     */
    @AnValidate(name = "验证账号")
    @ApiModelProperty(position = 10)
    private ValidateUser validateUser;


    public String getName() {
        return name;
    }

    public ValidateData setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getSex() {
        return sex;
    }

    public ValidateData setSex(Integer sex) {
        this.sex = sex;
        return this;
    }

    public Integer getAge() {
        return age;
    }

    public ValidateData setAge(Integer age) {
        this.age = age;
        return this;
    }

    public String getIdCard() {
        return idCard;
    }

    public ValidateData setIdCard(String idCard) {
        this.idCard = idCard;
        return this;
    }

    public Date getBirthday() {
        return birthday;
    }

    public ValidateData setBirthday(Date birthday) {
        this.birthday = birthday;
        return this;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public ValidateData setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
        return this;
    }

    public Date getDeadTime() {
        return deadTime;
    }

    public ValidateData setDeadTime(Date deadTime) {
        this.deadTime = deadTime;
        return this;
    }

    public BigDecimal getCharge() {
        return charge;
    }

    public ValidateData setCharge(BigDecimal charge) {
        this.charge = charge;
        return this;
    }

    public Double getTransportDistance() {
        return transportDistance;
    }

    public ValidateData setTransportDistance(Double transportDistance) {
        this.transportDistance = transportDistance;
        return this;
    }

    public ValidateUser getValidateUser() {
        return validateUser;
    }

    public ValidateData setValidateUser(ValidateUser validateUser) {
        this.validateUser = validateUser;
        return this;
    }
}
